package com.healer.IO;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class TestFileOutputStream {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("src/main/resources/TestFileOutputStream.txt"
                ,true);//这个true代表在原文件后面追加
        String text = "abcdefghijkmlnopqrstuvwxyz";
        byte[] bytes=text.getBytes();
        fos.write(bytes);
        fos.write(10001);
        fos.write(10002);
        fos.write(10003);
        fos.close();
    }
}
